using System.Collections.Generic;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing
{
	internal static class OracleLpErrorStrings
	{
		private const string c_vInvalidRuleHeadSymbol = "Invalid rule head symbol";

		private const string c_vInvalidRuleRHSSymbols = "Invalid rule right hand symbols";

		private const string c_vMissingParserSymbol = "None of the parser rules contains the {0} symbol";

		private const string c_vMissingRule = "The parser rules doesn't contain the {0} rule";

		private const string c_vMissingTable_View_Query = "The table, view or query reference named [{0}.{1}] is missing from the SELECT statement.";

		private const string c_vMissingColumnFromReference = "The column [{0}] is missing from the [{1}] object reference.";

		private const string c_vMissingColumnFromAllReferences = "The column [{0}] is missing from all corresponding object references.";

		private const string c_vAmbiguousColumn = "The column [{0}] is ambiguously defined in corresponding object references.";

		private static Dictionary<OracleLpExceptionError, string> s_vErrorStringDictionary;

		static OracleLpErrorStrings()
		{
			s_vErrorStringDictionary = new Dictionary<OracleLpExceptionError, string>();
			s_vErrorStringDictionary.Add(OracleLpExceptionError.InvalidRuleHeadSymbol, "Invalid rule head symbol");
			s_vErrorStringDictionary.Add(OracleLpExceptionError.InvalidRuleRHSSymbols, "Invalid rule right hand symbols");
			s_vErrorStringDictionary.Add(OracleLpExceptionError.MissingParserSymbol, "None of the parser rules contains the {0} symbol");
			s_vErrorStringDictionary.Add(OracleLpExceptionError.MissingRule, "The parser rules doesn't contain the {0} rule");
			s_vErrorStringDictionary.Add(OracleLpExceptionError.MissingTable_View_Query, "The table, view or query reference named [{0}.{1}] is missing from the SELECT statement.");
			s_vErrorStringDictionary.Add(OracleLpExceptionError.MissingColumnFromReference, "The column [{0}] is missing from the [{1}] object reference.");
			s_vErrorStringDictionary.Add(OracleLpExceptionError.MissingColumnFromAllReferences, "The column [{0}] is missing from all corresponding object references.");
			s_vErrorStringDictionary.Add(OracleLpExceptionError.AmbiguousColumn, "The column [{0}] is ambiguously defined in corresponding object references.");
		}

		public static string GetErrorString(OracleLpExceptionError item)
		{
			return s_vErrorStringDictionary[item];
		}
	}
}
